package com.thx.addressbook.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Transient;

/**
 * AddressbookCategory entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "ADDRESSBOOK_CATEGORY")
public class AddressbookCategory implements java.io.Serializable {

  private static final long serialVersionUID = 1L;

  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
  }


  // Fields
  @Id
  /*
   * @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="payablemoney_seq")
   * 
   * @SequenceGenerator(name="payablemoney_seq",
   * sequenceName="SEQ_ADDRESSBOOK_CATEGORY",allocationSize=1)
   */

  @GeneratedValue(strategy = GenerationType.TABLE, generator = "tab-store")
  @TableGenerator(name = "tab-store", table = "tb_generator", pkColumnName = "gen_name",
      valueColumnName = "gen_value", pkColumnValue = "SEQ_ADDRESSBOOK_CATEGORY", allocationSize = 1)
  private Long acId; // 通讯录分类Id
  private Long enterpriseId; // 所属企业Id
  private String acName; // 通讯录分类名称
  private String acIcon; // 通讯录分类图标
  private String isPublic; // 是否公共
  private Long acOrder; // 分类排序
  private Date createTime; // 创建时间
  private String updateUser; // 更新用户
  private Date updateTime; // 更新时间
  private String createUser; // 创建用户
  @Transient
  private String query;

  // Constructors

  /** default constructor */
  public AddressbookCategory() {}

  /** full constructor */
  public AddressbookCategory(Long enterpriseId, String acName, String acIcon, String isPublic,
      Long acOrder) {
    this.enterpriseId = enterpriseId;
    this.acName = acName;
    this.acIcon = acIcon;
    this.isPublic = isPublic;
    this.acOrder = acOrder;
  }

  // Property accessors

  public Long getAcId() {
    return this.acId;
  }

  public void setAcId(Long acId) {
    this.acId = acId;
  }

  public Long getEnterpriseId() {
    return this.enterpriseId;
  }

  public void setEnterpriseId(Long enterpriseId) {
    this.enterpriseId = enterpriseId;
  }

  public String getAcName() {
    return this.acName;
  }

  public void setAcName(String acName) {
    this.acName = acName;
  }

  public String getAcIcon() {
    return this.acIcon;
  }

  public void setAcIcon(String acIcon) {
    this.acIcon = acIcon;
  }

  public String getIsPublic() {
    return this.isPublic;
  }

  public void setIsPublic(String isPublic) {
    this.isPublic = isPublic;
  }

  public Long getAcOrder() {
    return this.acOrder;
  }

  public void setAcOrder(Long acOrder) {
    this.acOrder = acOrder;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Date getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(Date updateTime) {
    this.updateTime = updateTime;
  }

  public String getUpdateUser() {
    return updateUser;
  }

  public void setUpdateUser(String updateUser) {
    this.updateUser = updateUser;
  }

  public String getCreateUser() {
    return createUser;
  }

  public void setCreateUser(String createUser) {
    this.createUser = createUser;
  }

  public String getQuery() {
    return query;
  }

  public void setQuery(String query) {
    this.query = query;
  }

}
